from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
import pyqtgraph as pg
import numpy as np
class MainWindow(QMainWindow):
   def __init__(self):
       super().__init__()
       self.setWindowTitle('PyQtGraph Example')
       self.setGeometry(100, 100, 800, 600)
       central_widget = QWidget()
       self.setCentralWidget(central_widget)
       layout = QVBoxLayout(central_widget)
       self.plot_widget = pg.PlotWidget()
       layout.addWidget(self.plot_widget)
       x = np.linspace(0, 10, 1000)
       y = np.sin(x)
       self.plot_widget.plot(x, y, pen='b')
if __name__ == '__main__':
   app = QApplication([])
   window = MainWindow()
   window.show()
   app.exec_()
